using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LayersandTableViews
{
    /// <summary>
    /// <para>Make Mosaic Layer</para>
    /// <para>Creates a  mosaic layer from a mosaic dataset or layer file. The layer that is created by the tool is temporary and will not persist after the session ends unless the layer is saved as a layer file or the map  is saved.</para>
    /// <para>从镶嵌数据集或图层文件创建镶嵌图层。该工具创建的图层是临时的，除非将图层另存为图层文件或保存地图，否则在会话结束后不会保留。</para>
    /// </summary>    
    [DisplayName("Make Mosaic Layer")]
    public class MakeMosaicLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public MakeMosaicLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_mosaic_dataset">
        /// <para>Mosaic Dataset</para>
        /// <para>The path and name of the input mosaic dataset.</para>
        /// <para>输入镶嵌数据集的路径和名称。</para>
        /// </param>
        /// <param name="_out_mosaic_layer">
        /// <para>Output Mosaic Layer</para>
        /// <para>The name of the output mosaic layer.</para>
        /// <para>输出镶嵌图层的名称。</para>
        /// </param>
        public MakeMosaicLayer(object _in_mosaic_dataset, object _out_mosaic_layer)
        {
            this._in_mosaic_dataset = _in_mosaic_dataset;
            this._out_mosaic_layer = _out_mosaic_layer;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Make Mosaic Layer";

        public override string CallName => "management.MakeMosaicLayer";

        public override List<string> AcceptEnvironments => ["extent", "geographicTransformations", "outputCoordinateSystem"];

        public override object[] ParameterInfo => [_in_mosaic_dataset, _out_mosaic_layer, _where_clause, _template, _band_index, _mosaic_method, _order_field, _order_base_value, _lock_rasterid, _sort_order.GetGPValue(), _mosaic_operator.GetGPValue(), _cell_size, _processing_template.GetGPValue()];

        /// <summary>
        /// <para>Mosaic Dataset</para>
        /// <para>The path and name of the input mosaic dataset.</para>
        /// <para>输入镶嵌数据集的路径和名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_mosaic_dataset { get; set; }


        /// <summary>
        /// <para>Output Mosaic Layer</para>
        /// <para>The name of the output mosaic layer.</para>
        /// <para>输出镶嵌图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Mosaic Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_mosaic_layer { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>Using SQL, you can define a query or use the Query Builder to build a query.</para>
        /// <para>使用 SQL，可以定义查询或使用查询生成器生成查询。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Template Extent</para>
        /// <para><xdoc>
        ///   <para>The output extent can be specified by defining the four coordinates or by using the extent of an existing layer.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the data frame or visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>可以通过定义四个坐标或使用现有图层的范围来指定输出范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于数据框或可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Template Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _template { get; set; } = null;


        /// <summary>
        /// <para>Bands</para>
        /// <para>Choose which bands to export for the layer. If no bands are specified, all the bands will be used in the output.</para>
        /// <para>选择要为图层导出的波段。如果未指定波段，则将在输出中使用所有波段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bands")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _band_index { get; set; } = null;


        /// <summary>
        /// <para>Mosaic Method</para>
        /// <para><xdoc>
        ///   <para>Choose the mosaic method. The mosaic method defines how the layer is created from different rasters in the mosaic dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Closest to center—Sorts rasters based on an order where rasters that have their center closest to the view center are placed on top.</bullet_item><para/>
        ///     <bullet_item>Northwest—Sorts rasters based on an order where rasters that have their center closest to the northwest are placed on top.</bullet_item><para/>
        ///     <bullet_item>Lock raster—Enables a user to lock the display of single or multiple rasters, based on an ID or name. When you choose this option, you need to specify the Lock Raster ID.</bullet_item><para/>
        ///     <bullet_item>By attribute—Sorts rasters based on an attribute field and its difference from the base value. When this option is chosen, the order field and order base value parameters also need to be set.</bullet_item><para/>
        ///     <bullet_item>Closest to nadir—Sorts rasters based on an order where rasters that have their nadir position closest to the view center are placed on top. The nadir point can be different from the center point, especially in oblique imagery.</bullet_item><para/>
        ///     <bullet_item>Closest to view point—Sorts rasters based on an order where the nadir position is closest to the user-defined viewpoint location and are placed on top.</bullet_item><para/>
        ///     <bullet_item>Seamline—Cuts the rasters using the predefined seamline shape for each raster using optional feathering along the seams. The ordering is predefined during seamline generation. The LAST mosaic operator is not valid with this mosaic method.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择镶嵌方法。镶嵌方法定义如何从镶嵌数据集中的不同栅格创建图层。</para>
        ///   <bulletList>
        ///     <bullet_item>最接近中心 - 根据中心最靠近视图中心的栅格位于顶部的顺序对栅格进行排序。</bullet_item><para/>
        ///     <bullet_item>西北 - 根据中心最靠近西北的栅格位于顶部的顺序对栅格进行排序。</bullet_item><para/>
        ///     <bullet_item>锁定栅格 - 使用户能够根据 ID 或名称锁定单个或多个栅格的显示。选择此选项时，需要指定锁定栅格 ID。</bullet_item><para/>
        ///     <bullet_item>按属性 - 根据属性字段及其与基值的差异对栅格进行排序。选择此选项时，还需要设置订单字段和订单基值参数。</bullet_item><para/>
        ///     <bullet_item>最接近最低点 - 根据最低点位置最接近视图中心的栅格位于顶部的顺序对栅格进行排序。最低点可以与中心点不同，尤其是在倾斜影像中。</bullet_item><para/>
        ///     <bullet_item>最接近视点 - 根据最低点位置最接近用户定义的视点位置并位于顶部的顺序对栅格进行排序。</bullet_item><para/>
        ///     <bullet_item>接缝线 - 使用每个栅格的预定义接缝线形状切割栅格，并沿接缝进行可选羽化。顺序是在接缝生成过程中预定义的。LAST 镶嵌运算符不适用于此镶嵌方法。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _mosaic_method { get; set; } = null;


        /// <summary>
        /// <para>Order Field</para>
        /// <para><xdoc>
        ///   <para>Choose the order field. When the mosaic method is By attribute, the default field to use when ordering rasters needs to be set. The list of fields is defined as those in the service table that are of type metadata.</para>
        ///   <para>Choose the order field. When the mosaic method is BY_ATTRIBUTE, the default field to use when ordering rasters needs to be set. The list of fields is defined as those in the service table that are of type metadata.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择订单字段。当镶嵌方法为 By 属性时，需要设置对栅格进行排序时使用的默认字段。字段列表定义为服务表中元数据类型的字段。</para>
        ///   <para>选择订单字段。BY_ATTRIBUTE镶嵌方法时，需要设置对栅格进行排序时使用的默认字段。字段列表定义为服务表中元数据类型的字段。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Order Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _order_field { get; set; } = null;


        /// <summary>
        /// <para>Order Base Value</para>
        /// <para>The order base value. The images are sorted based on the difference between this value and the attribute value in the specified field.</para>
        /// <para>订单基值。根据此值与指定字段中的属性值之间的差异对图像进行排序。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Order Base Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _order_base_value { get; set; } = null;


        /// <summary>
        /// <para>Lock Raster ID</para>
        /// <para>The Raster ID or raster name to which the service should be locked so that only the specified rasters are displayed. If left undefined, it will be similar to the system default. Multiple IDs can be defined as a semicolon-delimited list.</para>
        /// <para>应锁定服务的栅格 ID 或栅格名称，以便仅显示指定的栅格。如果未定义，它将类似于系统默认值。多个 ID 可以定义为以分号分隔的列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Lock Raster ID")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _lock_rasterid { get; set; } = null;


        /// <summary>
        /// <para>Sort Order</para>
        /// <para><xdoc>
        ///   <para>Choose whether the sort order is ascending or descending.</para>
        ///   <bulletList>
        ///     <bullet_item>Ascending—The sort order will be ascending. This is the default.</bullet_item><para/>
        ///     <bullet_item>Descending—The sort order will be descending.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择排序顺序是升序还是降序。</para>
        ///   <bulletList>
        ///     <bullet_item>升序—排序顺序为升序。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>降序—排序顺序为降序。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Sort Order")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sort_order_value _sort_order { get; set; } = _sort_order_value._ASCENDING;

        public enum _sort_order_value
        {
            /// <summary>
            /// <para>Ascending</para>
            /// <para>Ascending—The sort order will be ascending. This is the default.</para>
            /// <para>升序—排序顺序为升序。这是默认设置。</para>
            /// </summary>
            [Description("Ascending")]
            [GPEnumValue("ASCENDING")]
            _ASCENDING,

            /// <summary>
            /// <para>Descending</para>
            /// <para>Descending—The sort order will be descending.</para>
            /// <para>降序—排序顺序为降序。</para>
            /// </summary>
            [Description("Descending")]
            [GPEnumValue("DESCENDING")]
            _DESCENDING,

        }

        /// <summary>
        /// <para>Mosaic Operator</para>
        /// <para><xdoc>
        ///   <para>Choose the mosaic operator to use. When two or more rasters have the same sort priority, this parameter is used to further refine the sort order.</para>
        ///   <bulletList>
        ///     <bullet_item>First—The first raster in the list will be on top. This is the default.</bullet_item><para/>
        ///     <bullet_item>Last—The last raster in the list will be on top.</bullet_item><para/>
        ///     <bullet_item>Minimum—The raster with the lowest value will be on top.</bullet_item><para/>
        ///     <bullet_item>Maximum—The raster with the highest value will be on top.</bullet_item><para/>
        ///     <bullet_item>Mean—The average pixel value will be on top.</bullet_item><para/>
        ///     <bullet_item>Blend—The output cell value will be a blend of values; this blend value relies on an algorithm that is weight based and dependent on the distance from the pixel to the edge within the overlapping area.</bullet_item><para/>
        ///     <bullet_item>Sum—The output cell value will be the aggregate of all overlapping cells.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择要使用的镶嵌运算符。当两个或多个栅格具有相同的排序优先级时，此参数用于进一步细化排序顺序。</para>
        ///   <bulletList>
        ///     <bullet_item>首先 - 列表中的第一个栅格将位于顶部。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>最后 - 列表中的最后一个栅格将位于顶部。</bullet_item><para/>
        ///     <bullet_item>最小值 - 值最低的栅格将位于顶部。</bullet_item><para/>
        ///     <bullet_item>最大值 - 具有最高值的栅格将位于顶部。</bullet_item><para/>
        ///     <bullet_item>平均值—平均像素值将位于顶部。</bullet_item><para/>
        ///     <bullet_item>混合—输出像元值将是多个值的混合;此混合值依赖于基于权重的算法，该算法取决于重叠区域内从像素到边缘的距离。</bullet_item><para/>
        ///     <bullet_item>Sum—输出像元值将是所有重叠像元的聚合。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Mosaic Operator")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _mosaic_operator_value _mosaic_operator { get; set; } = _mosaic_operator_value._FIRST;

        public enum _mosaic_operator_value
        {
            /// <summary>
            /// <para>First</para>
            /// <para>First—The first raster in the list will be on top. This is the default.</para>
            /// <para>首先 - 列表中的第一个栅格将位于顶部。这是默认设置。</para>
            /// </summary>
            [Description("First")]
            [GPEnumValue("FIRST")]
            _FIRST,

            /// <summary>
            /// <para>Last</para>
            /// <para>Last—The last raster in the list will be on top.</para>
            /// <para>最后 - 列表中的最后一个栅格将位于顶部。</para>
            /// </summary>
            [Description("Last")]
            [GPEnumValue("LAST")]
            _LAST,

            /// <summary>
            /// <para>Minimum</para>
            /// <para>Minimum—The raster with the lowest value will be on top.</para>
            /// <para>最小值 - 值最低的栅格将位于顶部。</para>
            /// </summary>
            [Description("Minimum")]
            [GPEnumValue("MIN")]
            _MIN,

            /// <summary>
            /// <para>Maximum</para>
            /// <para>Maximum—The raster with the highest value will be on top.</para>
            /// <para>最大值 - 具有最高值的栅格将位于顶部。</para>
            /// </summary>
            [Description("Maximum")]
            [GPEnumValue("MAX")]
            _MAX,

            /// <summary>
            /// <para>Mean</para>
            /// <para>Mean—The average pixel value will be on top.</para>
            /// <para>平均值—平均像素值将位于顶部。</para>
            /// </summary>
            [Description("Mean")]
            [GPEnumValue("MEAN")]
            _MEAN,

            /// <summary>
            /// <para>Blend</para>
            /// <para>Blend—The output cell value will be a blend of values; this blend value relies on an algorithm that is weight based and dependent on the distance from the pixel to the edge within the overlapping area.</para>
            /// <para>混合—输出像元值将是多个值的混合;此混合值依赖于基于权重的算法，该算法取决于重叠区域内从像素到边缘的距离。</para>
            /// </summary>
            [Description("Blend")]
            [GPEnumValue("BLEND")]
            _BLEND,

            /// <summary>
            /// <para>Sum</para>
            /// <para>Sum—The output cell value will be the aggregate of all overlapping cells.</para>
            /// <para>Sum—输出像元值将是所有重叠像元的聚合。</para>
            /// </summary>
            [Description("Sum")]
            [GPEnumValue("SUM")]
            _SUM,

        }

        /// <summary>
        /// <para>Output Cell Size</para>
        /// <para>The cell size of the output mosaic layer.</para>
        /// <para>输出镶嵌图层的像元大小。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Cell Size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Processing Template</para>
        /// <para><xdoc>
        ///   <para>The raster function processing template that can be applied on the output mosaic layer.</para>
        ///   <bulletList>
        ///     <bullet_item>None—No processing template.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>可应用于输出镶嵌图层的栅格函数处理模板。</para>
        ///   <bulletList>
        ///     <bullet_item>无 （None） - 无处理模板。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Processing Template")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _processing_template_value _processing_template { get; set; } = _processing_template_value._None;

        public enum _processing_template_value
        {
            /// <summary>
            /// <para>None</para>
            /// <para>None—No processing template.</para>
            /// <para>无 （None） - 无处理模板。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("None")]
            _None,

        }

        public MakeMosaicLayer SetEnv(object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null)
        {
            base.SetEnv(extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem);
            return this;
        }

    }

}